import { mapState, mapMutations } from 'vuex'
export default {
	name: 'insurance',
	data() {
		return {
			insuranceList: [],
			insurance_:null,
		}
	},
	computed: {
		...mapState([
			'passengerList', 'insurance'
		]),
		mergeData() {			
			this.insurance_ = JSON.parse(JSON.stringify(this.insurance))
			return this.insurance_;
		},
	},
	methods: {
		...mapMutations([
			'RECORD_INSURANCE',
		]),
		sure() {
			this.RECORD_INSURANCE(this.mergeData);
			this.$router.push({ path: '/book' });
		},
		
		//跳转保险说明页面
		explain(id){
			this.$router.push({ path: '/insuranceExplain?id='+id });
		}
	},
	created() {
		document.title = "保险";
	}
}